---
description:
  Learn how to integrate Apollo with Angular using ng add apollo-angular. Use Angular CLI Proxy to
  define configurations for your GraphQL endpoint
---

# Angular CLI

To get started with Apollo and Angular run:

```sh
ng add apollo-angular
```

## Proxy

If your GraphQL endpoint lives under different host with Angular CLI you can easily define proxy
configuration.

Take for example `api.example.com/graphql`:

```json
{
  "/graphql": {
    "target": "http://api.example.com"
  }
}
```

Create a json file (`proxy.config.json` for example) with that configuration.

To run server use `--proxy-config` option:

```sh
ng serve --proxy-config <path to file>
```

An example:

```sh
ng serve --proxy-config proxy.config.json
```
